<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

    <title>个人资料</title>

    <link th:href="@{/AmazeUI-2.4.2/assets/css/admin.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/AmazeUI-2.4.2/assets/css/amazeui.css}" rel="stylesheet" type="text/css">
<!--    <link th:href="@{/css/jHsDate.css}" rel="stylesheet" type="text/css">-->

    <link th:href="@{/css/personal.css}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/infstyle.css}" rel="stylesheet" type="text/css">
    <script th:src="@{/AmazeUI-2.4.2/assets/js/jquery.min.js}"></script>
    <script th:src="@{/AmazeUI-2.4.2/assets/js/amazeui.js}"></script>


<!--    <script th:src="@{/js/jHsDate.js}"></script>-->
</head>

<body>
<th:block th:include="common :: header2"></th:block>
<th:block th:include="common :: category"></th:block>
<div class="center">
    <div class="col-main">
        <div class="main-wrap">

            <div class="user-info">
                <!--标题 -->
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">个人资料</strong> / <small>Personal&nbsp;information</small>
                    </div>
                </div>
                <hr/>

                <!--头像 -->
                <div class="user-infoPic">
                    <form th:action="@{/user/uploaduimg}" method="post" enctype="multipart/form-data">
                        <div class="filePic">
                            <input type="file" class="inputPic" allowexts="jpeg,jpg,png"
                                   accept="image/jpeg, image/pjpeg">
                            <th:block th:if='${Img}==null'>
                                <img class="am-circle am-img-thumbnail" src="../images/getAvatar.do.jpg" alt="用户图片"
                                     title="用户图片"/>
                            </th:block>
                            <th:block th:if='${Img}!=null'>
                                <img class="am-circle am-img-thumbnail" th:src="@{'/'+${Img}}" alt="用户图片"
                                     title="用户图片"/>
                            </th:block>
                        </div>

                        <p class="am-form-help">头像</p>

                        <div class="info-m">
                            <div><b>用户名：<i>小叮当</i></b></div>
                            <div class="vip">
                                <span></span><a href="#">会员专享</a>
                            </div>
                        </div>
                        <input type="submit" th:value="上传">
                    </form>

                </div>

                <!--个人信息 -->
                <div class="info-main">
                    <form class="am-form am-form-horizontal" th:action="@{/user/information}" method="post">
                        <input type="hidden" name="id" th:value="${User.id}" />
                        <div class="am-form-group">
                            <label for="nick-name" class="am-form-label">昵称</label>
                            <div class="am-form-content">
                                <input type="text" id="nick-name" name="nickname" maxlength="20" placeholder="nickname">
                                <small>昵称长度不能超过20个汉字</small>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label for="user-name" class="am-form-label">用户名</label>
                            <div class="am-form-content">
                                <input type="text" id="user-name" name="username" th:placeholder="${User.username}" disabled="disabled">

                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-form-label">性别</label>
                            <div class="am-form-content sex">
                                <label class="am-radio-inline">
                                    <input type="radio" name="gender" value="MALE" th:checked="${User.gender.code} eq 0"> 男
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="gender" value="FEMALE" th:checked="${User.gender.code} eq 1 "> 女
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="gender" value="SECRET" th:checked=" ${User.gender.code} eq 2 "> 保密
                                </label>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label for="user-birth" class="am-form-label">生日</label>
                            <div class="am-form-content birth" id="user-birth">
                                <input type="date" id="date" name="birthday"  th:value="${User.birthday}" ;/>
                            </div>

                            <!--<script>
                                $('#date').jHsDate();
                            </script>-->
                        </div>
                        <div class="am-form-group">
                            <label for="user-phone" class="am-form-label">电话</label>
                            <div class="am-form-content">
                                <input id="user-phone" th:value="${User.phone}" type="tel" disabled="disabled">
                                <small>电话请到安全设置里更改</small>

                            </div>
                        </div>
                        <div class="am-form-group">
                            <label for="user-email" class="am-form-label">电子邮件</label>
                            <div class="am-form-content">
                                <input id="user-email" name="email" placeholder="Email" type="email" th:value="${User.email}">

                            </div>
                        </div>

                        <div class="info-btn">
                            <input type="submit" class="am-btn am-btn-danger" th:value="保存修改"  >
                        </div>

                    </form>
                </div>

            </div>

        </div>
        <!--底部-->
        <th:block th:include="common :: footer"></th:block>
    </div>
    <th:block th:include="common :: menu"></th:block>

</div>

</body>

</html>